package com.xinqi.controller;

import com.xinqi.common.R;
import com.xinqi.service.IGoodsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author xin麒
 * @date 2023/2/17 15:15
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Resource
    private IGoodsService goodsService;
    @GetMapping("/buyGood/{goodsId}")
    public R buyGoods(@PathVariable("goodsId") Long goodsId){
        return goodsService.buyOneGoods(goodsId);
    }
}
